<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>添加用户后台管理</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<link rel="stylesheet" href="css/admin_myLayui.css">
<!-- Bootstrap core CSS -->
<!-- <link href="css/bootstrap.css" rel="stylesheet"> -->

<script src="layui/layui.all.js"></script>

<!-- <!-- Custom styles for this template --> 
<!-- <link href="css/dashboard.css" rel="stylesheet"> -->

</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo"><img alt="" src="imgs/logo_02.png"></div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<ul class="layui-nav layui-layout-left">
				<li class="layui-nav-item"><a href="">控制台</a></li>
				<li class="layui-nav-item"><a href="">商品管理</a></li>
				<li class="layui-nav-item"><a href="">用户</a></li>
				<li class="layui-nav-item"><a href="javascript:;">其它系统</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="">邮件管理</a>
						</dd>
						<dd>
							<a href="">消息管理</a>
						</dd>
						<dd>
							<a href="">授权管理</a>
						</dd>
					</dl></li>
			</ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a href="javascript:;"> <img
						src="http://t.cn/RCzsdCq" class="layui-nav-img"><%=request.getSession().getAttribute("username") %>
				</a>
			    </li>
				<li class="layui-nav-item"><a href="">退了</a></li>
			</ul>
		</div>

		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
			<ul class="layui-nav layui-nav-tree" lay-filter="test">
					<li class="layui-nav-item"><a class=""
						href="javascript:;">用户信息</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="admin_users.jsp">用户列表</a>
							</dd>
							<dd class="layui-this">
								<a href="useradd.jsp">添加用户</a>
							</dd>
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">公寓信息</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="admin_house.jsp">房屋列表</a>
							</dd>
							<dd>
								<a href="houseadd.jsp">添加房屋信息</a>
							</dd>
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">缴纳信息</a>
					  <dl class="layui-nav-child">
							<dd>
								<a href="admin_prices.jsp">缴纳列表</a>
							</dd>
							<dd>
								<a href="priceadd.jsp">添加缴纳信息</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item layui-nav-itemed"><a href="javascript:;">房源信息</a>
					  <dl class="layui-nav-child">
							<dd>
								<a href="admin_housing.jsp">房源列表</a>
							</dd>
							<dd class="layui-this">
								<a href="housingadd.jsp">添加房源信息</a>
							</dd>
						</dl>
					</li>
					<li class="layui-nav-item"><a href="fix.jsp">故障内容</a></li>
					<li class="layui-nav-item"><a href="admin_forum.jsp">社区评论</a></li>
				</ul>
			</div>
		</div>

		<div class="layui-body">
		
		<h2 class="housingaddh2_1">增加前台界面</h2>
				<form class="layui-form" action="hs.do?op=add" method="post">
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">公寓名称</label>
				    <div class="layui-input-block">
				      <select name="houseName" lay-filter="aihao">
				        <option value="蔡塘悦舍">蔡塘悦舍</option>
				        <option value="悦舍大院">悦舍大院</option>
				        <option value="悦舍阔居">悦舍阔居</option>
				      </select>
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">房间类型</label>
				    <div class="layui-input-block">
				      <select name="houseType" lay-filter="aihao">
				        		<option value="大单间">大单间</option>
								<option value="小单间">小单间</option>
								<option value="复式一居室">复式一居室</option>
								<option value="复式两居室">复式两居室</option>
								<option value="复式三居室">复式三居室</option>
				      </select>
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">房间标题</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsTiele" lay-verify="title" autocomplete="off" placeholder="请输入房间标题" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">房屋价格</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsPrice" lay-verify="title" autocomplete="off" placeholder="请输入房屋价格" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">剩余房源</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsRemain" lay-verify="title" autocomplete="off" placeholder="请输入剩余房源" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">房屋面积</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsArea" lay-verify="title" autocomplete="off" placeholder="请输入房屋面积" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">房屋地址</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsAddress" lay-verify="title" autocomplete="off" placeholder="请输入房屋地址" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">联系电话</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsCall" lay-verify="title" autocomplete="off" placeholder="请输入联系电话" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">房东微信</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsWechat" lay-verify="title" autocomplete="off" placeholder="请输入房东微信" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-form-item">
				    <label class="layui-form-label">房屋介绍</label>
				    <div class="layui-input-block">
				      <input type="text" name="hsIntroduce" lay-verify="title" autocomplete="off" placeholder="请输入房屋介绍" class="layui-input housingaddtext">
				    </div>
				  </div>
				  
				  <div class="layui-upload">
					  <button type="button" class="layui-btn" id="btn1" name="hsPic01">上传图片01</button>
					  <div class="layui-upload-list">
					    <img class="layui-upload-img" id="demo1">
					    <p id="demoText"></p>
					  </div>
				</div>
				
				<div class="layui-upload">
					  <button type="button" class="layui-btn" id="btn2">上传图片02</button>
					  <div class="layui-upload-list">
					    <img class="layui-upload-img" id="demo2" name="hsPic02">
					    <p id="demoText"></p>
					  </div>
				</div>   
				
				<div class="layui-upload">
					  <button type="button" class="layui-btn" id="btn3" name="hsPic03">上传图片03</button>
					  <div class="layui-upload-list">
					    <img class="layui-upload-img" id="demo3">
					    <p id="demoText"></p>
					  </div>
				</div>
				  
				   <div class="layui-form-item">
					    <div class="layui-input-block">
					      <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">增加</button>
					    </div>
					  </div>
				</form>
			</div>
		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© layui.com - 底部固定区域
		</div>

	<script src="layui/layui.js"></script>
	
	<script>
	layui.use(['upload','jquery'], function(){
		  var upload = layui.upload;
		  var $ = layui.jquery;
		   
		  //执行实例
		  var uploadInst = upload.render({
		    elem: '#btn1' //绑定元素
		    ,url: 'uis1.do' //上传接口
		    ,accept: 'file'
		    ,done: function(res){
		      //上传完毕回调
		      layui.use('layer', function(){
		              var layer = layui.layer;

		                layer.msg(res.url, {
		                       time: 2000, //6s后自动关闭
		                       icon:1
		                 },function(){
		                	 console.log("res :"+res.code);
//		                 	 $(".layui-nav-img").attr("src","/YLMS/imgs/"+res.code)
		                	 
		                 });
		            });
		      console.log(res.code);
		    },before: function(obj){
			       //预读本地文件示例，不支持ie8
			       obj.preview(function(index, file, result){
			         $('#demo1').attr('src', result); //图片链接（base64）
			       });
			     }
		    ,error: function(msg){
		      //请求异常回调
		      console.log(msg);
		    }
		  });
		});
	
	
	//2
layui.use(['upload','jquery'], function(){
  var upload = layui.upload;
  var $ = layui.jquery;
   
  //执行实例
  var uploadInst = upload.render({
    elem: '#btn2' //绑定元素
    ,url: 'uis2.do' //上传接口
    ,accept: 'file'
    ,done: function(res){
      //上传完毕回调
      layui.use('layer', function(){
              var layer = layui.layer;

                layer.msg(res.url, {
                       time: 2000, //6s后自动关闭
                       icon:1
                 },function(){
                	 console.log("res :"+res.code);
//                 	 $(".layui-nav-img").attr("src","/YLMS/imgs/"+res.code)
                	 
                 });
            });
      console.log(res.code);
    },before: function(obj){
	       //预读本地文件示例，不支持ie8
	       obj.preview(function(index, file, result){
	         $('#demo2').attr('src', result); //图片链接（base64）
	       });
	     }
    ,error: function(msg){
      //请求异常回调
      console.log(msg);
    }
  });
});
	
	//3
	layui.use(['upload','jquery'], function(){
  var upload = layui.upload;
  var $ = layui.jquery;
   
  //执行实例
  var uploadInst = upload.render({
    elem: '#btn3' //绑定元素
    ,url: 'uis3.do' //上传接口
    ,accept: 'file'
    ,done: function(res){
      //上传完毕回调
      layui.use('layer', function(){
              var layer = layui.layer;

                layer.msg(res.url, {
                       time: 2000, //6s后自动关闭
                       icon:1
                 },function(){
                	 console.log("res :"+res.code);
//                 	 $(".layui-nav-img").attr("src","/YLMS/imgs/"+res.code)
                	 
                 });
            });
      console.log(res.code);
    },before: function(obj){
	       //预读本地文件示例，不支持ie8
	       obj.preview(function(index, file, result){
	         $('#demo3').attr('src', result); //图片链接（base64）
	       });
	     }
    ,error: function(msg){
      //请求异常回调
      console.log(msg);
    }
  });
});
</script>
	
	<script>
		//JavaScript代码区域
		
		 layui.use('form', function(){
        var form = layui.form;
        form.render();
    });
		
		
		layui.use('element', function() {
			var element = layui.element;

		});
	</script>
</body>
</html>